
<div id="costReportFormStatic">
    <script th:inline="none" >
        function changeWorkerTypeNname2(value) {
            if (value == '1') {
                return "配制人工"
            } else if (value == '2') {
                return "灌装基础人工"
            } else if (value == '3') {
                return "灌装/组装人工"
            } else if (value == '4') {
                return "搬运人工"
            }
            return value

        }
        //1、按钮【标准工时详情】触发方法
        function formatCountItem() {
            //打开可选择类型
            var crb=$("#cost_report_static_b").datagrid("getSelected");
            if(crb){
                $('#InitialInfo_static_dlg').dialog({
                    title: '人工类型工时',
                    width: 1050,
                    height: 730,
                    left: 300,
                    top: 100,
                    closed: false,
                    cache: false,
                    modal: true,
                    onClose:function(){
                        $("#InitialInfo_static_table").datagrid("loadData", {total: 0, rows: []});             //清空datagrid
                        $("#InitialInfo_static_table2").datagrid("loadData", {total: 0, rows: []});             //清空datagrid
                    },
                    onOpen: function () {
                        //获取cost_report_b表格中的数据，根据id判断是否从数据库获取的
                        var  workerType=crb.workerType;
                        //弹窗后调用方法使用类型workerType来初始化两个表格
                        setEditing_worker_type(workerType);
                        //弹窗后InitialInfo_crii_typed设置类型
                        $("#InitialInfo_static_crii_type").combobox("setValue", workerType);
                        // 根据此行的id从数据库获取cost_report_b_singlehours_item表中的操作数据
                        var data= commonAjax("post","/costReportB/getCostReportBSinglehoursById",{"costReportId":$("#costReportStaticId").val()});
                        if (data.status==200){
                            var  costReportBSinglehoursItem=data.obj;
                            costReportBSinglehoursItem.forEach(function (val) {
                                //若相等
                                if (crb.costId==val.costId){
                                    $('#InitialInfo_static_table').edatagrid('addRow', {
                                        row: {
                                            num:val.num,                                    //序号
                                            subId: val.subId,                               //隐藏的id
                                            workerType: val.workerType,                    //隐藏的类型id
                                            standard_type: val.standard_type,                    //简称名称
                                            standard_date: val.standard_date,                //标准工时
                                            appendManHour:val.appendManHour,                //附加工时
                                            initialInfo_milliliter: val.initialInfo_milliliter,//灌装总量
                                            singlehours: val.singlehours                        //单支工时
                                        }

                                    })
                                }
                            })
                        }
                    }
                });
            }else {
                layer.msg("请选择一行查询！")
            }
            $('#InitialInfo_static_table').edatagrid('saveRow');
            $('#InitialInfo_static_dlg').dialog('center') //纠正窗口
        }
        function setEditing_worker_type(newValue,oldValue) {
            var thisNewValue=newValue;
            if (newValue == 4) {
                newValue = 3;
            }
            // 初始化类型表格：InitialInfo_table2
            InitialInfo_table2_static_init(newValue,thisNewValue);
            InitialInfo_table_static_init(newValue)
        }
        // 初始化类型表格：InitialInfo_table2
        function InitialInfo_table2_static_init(newValue,thisNewValue) {
            $('#InitialInfo_static_table2').datagrid({
                nowrap:false,
                toolbar: '#InitialInfo_static_table2_tb',
                url: '/costReportForm/costReportInitialInfo?type=' + newValue + '&typeName=',
                columns: [[
                    {field: 'num', title: '序号',align: 'left', width: 15},
                    {field: 'text', title: '类型名称',align: 'left', width: 100},
                    {field: 'id', title: '工时',align: 'left', width: 15},
                    {field: 'remark', title: '备注',align: 'left', width: 100}
                ]]
            })

        }

        //计算单支工时的表格初始化：InitialInfo_table
        function InitialInfo_table_static_init(newValue) {
            if (newValue == 1) {
                $('#InitialInfo_static_table').edatagrid({
                    selectOnCheck: false,
                    columns: [[
                        {field: 'num', title: '序号', align: 'center', width: 20},
                        {field: 'subId', title: '产品标准工时id', align: 'center',  editor: 'text', hidden: true},
                        {field: 'costId', title: '用户需要计算单支工时详情的关联字段', align: 'center', editor: 'text', hidden: true},
                        {field: 'workerType', title: '类型', align: 'center', editor: 'text', hidden: true},
                        {field: 'standard_type', title: '类型名称', align: 'center', width: 100, editor: 'text'},
                        {field: 'standard_date', title: '标准工时', align: 'center', width: 40, editor: 'numberbox'},
                        {
                            field: 'appendManHour',
                            title: '附加工时',
                            align: 'center',
                            width: 40,
                            editor: {type: 'numberbox', options: {precision: 2}}
                        },
                        {
                            field: 'initialInfo_milliliter',
                            title: '灌装总量',
                            align: 'center',
                            width: 40,
                            editor: {type: 'numberbox', options: {precision: 6, required: true}}
                        },
                        {
                            field: 'singlehours',
                            title: '单支工时',
                            align: 'center',
                            width: 40,
                            editor: {type: 'numberbox', options: {precision: 4}}
                        }

                    ]]

                })
            } else {
                //罐装基础工时、产品工艺标准工时 --初始化表格
                $('#InitialInfo_static_table').edatagrid({
                    selectOnCheck: false,
                    columns: [[
                        {field: 'num', title: '序号', align: 'center', width: 20},
                        {field: 'subId', title: '产品标准工时id',editor: 'text', hidden: true},
                        {field: 'costId', title: '用户需要计算单支工时详情的关联字段',hidden: true},
                        {field: 'workerType', title: '类型',hidden: true},
                        {field: 'standard_type', title: '类型名称', align: 'center', width: 100, editor: 'text'},
                        {field: 'standard_date', title: '标准工时', align: 'center', width: 40, editor: 'numberbox'},
                        {
                            field: 'appendManHour',
                            title: '附加工时',
                            align: 'center',
                            width: 40,
                            editor: {type: 'numberbox',options: {precision: 2}}
                        },
                        {
                            field: 'singlehours',
                            title: '单支工时',
                            align: 'center',
                            width: 40,
                            editor: {type: 'numberbox', options: {precision: 4}}
                        }
                    ]]

                })
            }
        }

        //根据组织查询部门
        $("#reportFormStatic_Form_pkOrgAccount").combobox({
            onChange: function (newValue, oldValue) {
                $("#reportFormStatic_Form_department").combotree({
                    url: '/costReportForm/getCostPkOrg?pkHrorg=' + newValue
                })
            }
        })

        //点击【授权费\顾问\其他】触发方法
        function calculateOtherChargesZtOnClickStatic(){
            //根据自身找父类元素，然后添加html内容
            $("#calculateOtherCharges").parent().append("<div id='calculateOtherChargesZtDialog'><table id='calculateOtherChargesZtTable'></table></div>")
            $("#calculateOtherChargesZtDialog").dialog({
                title:"费用详情",
                width:600,
                height:300,
                modal:true,
                onOpen:function () {
                    //初始化表格
                    $("#calculateOtherChargesZtTable").datagrid({
                        url:'/costReportForm/getCalculateOtherChargesZtTableData',
                        singleSelect:false,
                        queryParams:{costReportId:$("#costReportStaticId").textbox("getValue")},
                        columns:[[
                            {field:'otherChargesName',title:'费用名称',width:186,align:'center',editor:{type:'text'}},
                            {field:'otherChargesMoney',title:'金额',width:78,align:'center'},
                            {field:'otherChargesNum',title:'数量',width:68,align:'center'},
                            {field:'otherChargesPrice',title:'单价',width:78,align:'center'},
                            {field:'otherChargesRemark',title:'备注',width:171,align:'center'}
                        ]]
                    })
                },
                onClose:function () {
                    //销毁弹窗内容
                    $("#calculateOtherChargesZtDialog").dialog("destroy")
                }

            })
        }

        //添加纸箱方法
        function addTartonStatic(){
            //动态添加--不会造成页面 沉与
            $("#cost_report_c_tb_static").append('<div id="addTartonIdStatic" style="text-align: center" data-options="title:\'纸箱\'"><table id="addTartonIdDataGrid"></table></div>');
            $("#addTartonIdStatic").dialog({
                width: 750,
                height: 350,
                border:true,
                collapsible:false,
                minimizable:false,
                maximizable:false,
                modal:true,
                onClose: function () {
                    //关闭后销毁掉
                    $("#addTartonIdStatic").dialog("destroy")
                },
                onOpen: function () {//加载完远程内容后触发
                    addTartonIdDataGridInit()
                }
            })
        }
        function cutAddTartontableInitStatic(e) {
           var val= e.getAttribute("attr")
            if(val=="a"){
                addTartonIdDataGridInit()
            }else {
                addTartonIdDataGridInit2()
            }
        }
        function addTartonIdDataGridInit(){
            $("#addTartonTable_tb2_static").hide();
            var ddTartonTableTypeColumns=[[
                {field:'name',width:120,align:'center',title:'名称'},
                {field:'len',width:40,align:'center',title:'长'},
                {field:'w',width:40,align:'center',title:'宽'},
                {field:'h',width:40,align:'center',title:'高'},
                {field:'price',width:40,align:'center',title:'单价'},
                {field:'price1',width:60,align:'center',title:'计算结果'},
            ]];
            $("#addTartonIdDataGrid").datagrid({
                url:'/costReportCarton/getCartonPriceDetailsRecord?costReportId='+$("#costReportStaticId").textbox("getValue")+'&t=1',
                fitColumns:true,
                columns:ddTartonTableTypeColumns,
                toolbar:"#addTartonTable_tb_static"
            })
        }
        function addTartonIdDataGridInit2(){
            $("#addTartonTable_tb_static").hide();
            $("#addTartonIdDataGrid").datagrid({
                url:'/costReportCarton/getCartonPriceDetailsRecord?costReportId='+$("#costReportStaticId").textbox("getValue")+'&t=2',
                fitColumns:true,
                columns:[[
                    {field:'name',width:120,align:'center',title:'名称'},
                    {field:'len',width:40,align:'center',title:'长'},
                    {field:'w',width:40,align:'center',title:'宽'},
                    {field:'price',width:40,align:'center',title:'单价'},
                    {field:'h',width:60,align:'center',title:'刀卡数量'},
                    {field:'price1',width:60,align:'center',title:'计算结果'}
                ]],
                toolbar:"#addTartonTable_tb2_static"
            })
        }

    </script>
    <!--展示图片问题-->
    <style>
        .costReportFormImageDiv{ width:200px; height:180px;overflow:hidden}
        .costReportFormImageDiv img{
            max-width:200px;
            _width:expression(this.width > 200 ? "200px" : this.width);
            max-height:180px;
            _height:expression(this.width > 180 ? "18px" : this.height);
        }
    </style>
    <form id="reportFormStatic_Form" method="post">
        <!-- 开始表单 -->
        <div style="margin-left:10px;text-align: left">
            <table style="border-collapse:separate; border-spacing:0px 20px;">
                <!--第一行-->
                <tr style="padding-bottom: 5px">
                    <td width="17%" >
                        <input id="costReportStaticId" class="easyui-textbox" data-options="readonly:'true',editable:false,label:'成本单据',labelWidth:'60',width:200" name="costReportId" style="width:97%">
                    </td>
                    <td width="16%">
                        <input id="costReportDate" class="easyui-datebox" editable="false" name="costReportDate"
                               data-options="readonly:'true',label:'日期',current:true,labelWidth:'60',labelAlign:'right'" style="width:97%">
                    </td>
                    <td width="15%">
                        <input style="width:96%" class="easyui-combobox" data-options="readonly:'true',labelAlign:'right',valueField: 'value',label:'成品含客料',labelWidth:'70',
                         textField: 'label',data: [{label: '是',value: '1'},{label: '否',value: '2'}]" name="finishedProduct">

                    </td>
                    <td width="20%">
                        <input class="easyui-textbox" id="clientcode" name="clientcode" data-options="readonly:'true',label:'客户编码',labelWidth:'60',labelAlign:'right'" style="width:98%">
                    </td>
                    <td align="right">
                        <input id="costEdition" class="easyui-numberbox"
                               data-options="readonly:'true',labelAlign:'left',label:'版本',labelWidth:'60',width:150,labelAlign:'right'"
                               name="costEdition" style="width:75%">
                    </td>

                    <td width="20%" rowspan="4" align="center">
                        <div id="costImagePathDivStatic">
                            无产品图片
                            <input id="costReportFormFile" type="file" onchange="costReportUploadFile()" name="file" style="width:100%;display: none">
                        </div>
                        <!--保存上传的路径-->
                        <input id="costImagePathStartIdStatic"  name="costImagePath" style="width:98%;display: none">
                        <div class="costReportFormImageDiv">
                            <img id="costReportFormImageStatic" >
                        </div>
                    </td>
                </tr>
                <!-- 第二行-->
                <tr>
                    <td colspan="2">
                        <input class="easyui-combobox"
                               data-options="readonly:'true',label:'销售组织',labelWidth:'60',valueField:'pkOrg',width:200,textField:'name',url:'/qc/pkOrg'"
                               name="salesPkOrg" style="width:100%" >
                    </td>
                    <td>
                        <input class="easyui-combobox" data-options="panelHeight:'auto',required:true,valueField: 'value',label:'配方含客料',labelWidth:'70',labelAlign:'right',
                            textField: 'label',data: [{label: '是',value: '1'},{label: '否',value: '2'}]" name="whetherSupplier"  style="width:96%">
                    </td>
                    <td colspan="2">
                        <input class="easyui-textbox" id="clientName" name="clientName" data-options="label:'客户全称',labelWidth:'60',labelAlign:'right'" style="width:100%">
                    </td>
                </tr>
                <!--第三行-->
                <tr>
                    <td colspan="2">
                        <input id="reportFormStatic_Form_pkOrgAccount" class="easyui-combobox" data-options="readonly:'true',label:'公司账套',prompt:'需先选择销售组织',labelWidth:'60',width:200,valueField:'pkOrg',textField:'name',url:'/qc/pkOrg'"
                               name="pkOrgAccount" style="width:100%">
                    </td>
                    <td>
                        <input class="easyui-combobox" data-options="panelHeight:'auto',required:true,valueField: 'value',label:'销售类型',labelWidth:'70',labelAlign:'right',
                        textField: 'label',data: [{label: '内销',value: '内销'},{label: '外销',value: '外销'}]" name="saleType" style="width:96%">
                    </td>
                    <td colspan="2">
                        <input class="easyui-textbox" id="productName" name="productName"
                               data-options="label:'产品名称',labelWidth:'60',labelAlign:'right'" style="width:100%" >
                    </td>
                </tr>
                <!--第四行-->
                <tr>
                    <td colspan="2">
                        <input id="reportFormStatic_Form_department" name="department" class="easyui-combotree" data-options="labelAlign:'right',required:true,panelWidth:200,readonly:'true',label:'部门',labelWidth:'60',width:200,prompt:'需先选择公司账套'" style="width:100%"/>
                    </td>
                    <td>
                        <input class="easyui-combobox" data-options="required:true,valueField: 'value',label:'更新类型',labelWidth:'70',labelAlign:'right',panelHeight:100,
                        textField: 'label',data: [{ label: '新报价',value: '1'},{label: '更新成本',value: '2'},{label: '更新报价',value: '3'},{label: '更新报告及成本',value: '4'}]"
                               name="updateType" style="width:96%">
                    </td>
                    <td >
                        <input id="costReport_Form_costReportUnits" class="easyui-textbox" name="costReportUnits"
                               data-options="label:'单位',labelWidth:'40',labelAlign:'right',labelAlign:'right'" style="width:41%">
                        <input id="costReport_Form_capacity" class="easyui-textbox" name="capacity"
                               data-options="label:'容量规格',labelWidth:'60',labelAlign:'right'" style="width:57.5%">
                    </td>
                    <td align="right">
                        <input id="costReport_Form_encasementQuantity" class="easyui-numberbox" name="encasementQuantity"
                               data-options="label:'装箱量',labelWidth:'50',labelAlign:'right'" value="1" style="width:75%">
                    </td>
                </tr>
                <!--第五行-->
                <tr>
                    <td colspan="3">
                        <input  class="easyui-textbox"  name="finishedProductCode" style="width:50%"
                                data-options="label:'成品编码',labelWidth:'60',labelAlign:'right'">-
                        <input name="finishedProductCode2"   class="easyui-textbox" style="width:46%">
                    </td>
                    <td>
                        <input class="easyui-textbox" name="quotation" data-options="required:true,label:'报价单编号',labelWidth:'70',labelAlign:'right',prompt:'SCXXXXXXXXX号'" style="width:100%">
                    </td>
                    <td align="right">
                        <input class="easyui-numberbox"
                               data-options="label:'订单量',labelWidth:'50',labelAlign:'right'"
                               name="orderQuantity" id="orderQuantityId" style="width:75%">

                    </td>

                </tr>
            </table>
        </div>
        <!-- A 水料价 -->
        <div style="width: 98%;margin: 20px;margin-left: 10px;border:2px #FFFF00 solid">
            <table id="cost_report_static_a" class="easyui-datagrid" fitColumns="true" iconCls="icon-edit"idField="id"  style="width:100%;height:auto;"
                   title="<span style='color: #7c5aae;background-color: #FFFF00'>A 水料价:</span><span style='color: green'>报价率为成本【￥5/kg以下X2】【￥5/kg-￥10/kgX1.75】【￥10/kg-￥20/kgX1.5】如少有/全新的配方或开料复杂要先咨询开发部才定</span>">
                <thead>
                <tr>
                    <th align="center" field="id" hidden="true" width="80">id</th>
                    <th align="center" field="labelCapacity" width="120">标签容量(1\kg)</th>
                    <th align="center" field="ratio" width="80">比重率</th>
                    <th align="center" field="actualValue" width="120">实际灌装重量(kg)</th>
                    <th align="center" field="unitName" width="120">水料名称(kg)</th>
                    <th align="center" field="detailName" width="150">配方号</th>
                    <th align="center" field="unitPrice" width="120">水料单价(kg)</th>
                    <th align="center" field="sysUnitPrice" width="120">系统水料单价(kg)</th>
                    <th align="center" field="costPrice" width="120">成本价/pcs</th>
                    <th align="center" field="quotedPrice" width="120">报价率(2至1.5)/pcs</th>
                </tr>
                </thead>
            </table>
        </div>
        <div style="margin: 10px;">
            <label>水料成本价合计:</label>
            <input class="easyui-textbox" data-options="readonly:'true'" name="totalOfPartA" style="width: 70px" >
        </div>

        <!-- B 人工 -->
        <div style="width: 98%;margin: 20px;margin-left: 10px;border: #00F7DE solid 2px">
            <table id="cost_report_static_b" class="easyui-datagrid" fitColumns="true" iconCls="icon-edit" idField="id" showFooter="true" toolbar="#cost_report_static_b_tb" singleSelect="true"
                   style="width:100%;height:auto" title="<span style='color: #0000FF;background-color:#00F7DE'>B 人工: </span><span style='color: green'>人工——成本工时单价为￥20/小时，（工时计算按澳宝惠州/兆婷提供的工时计算表）</span>">
                <thead>
                <tr>
                    <th align="center" field="id" hidden="true" width="100">id</th>
                    <th align="center" field="costId" hidden="true" width="100">计算单支工时操作详情关联字段</th>
                    <th align="center" field="subId" hidden="true" width="100">产品标准工时id</th>
                    <th align="center"  field="workerType"  formatter="changeWorkerTypeNname2" width="30">工作类型</th>
                    <th align="center"  field="pieceTime" width="20">单支工时</th>
                    <th align="center"  field="standardTime" width="20">标准工时</th>
                    <th align="center"  field="timeUnitPrice" width="20">工时单价</th>
                    <th align="center"  field="price" width="20">价格/pcs</th>
                    <th align="center"  field="processDecomposition" width="100">工艺分解/pcs</th>
                </tr>
                </thead>
            </table>
            <!--             B 人工 工具栏-->
            <div id="cost_report_static_b_tb" style="text-align: right;">
                <a class="easyui-linkbutton" href="#" iconCls="icon-add"
                   onclick="formatCountItem()"
                   plain="true">标准工时详情</a>
            </div>

            <!--选择类型工时弹窗-->
            <div closed="true" class="easyui-dialog" id="InitialInfo_static_dlg">
                <div id="InitialInfo_static_table2_tb" style="padding:2px 5px;display: none">
                    <div class="easyui-panel" style="width:100%;">
                        <input class="easyui-searchbox" data-options="prompt:'请输入内容',menu:'#InitialInfo_static_crii_mu'" style="width:50%">
                        <input id="InitialInfo_static_crii_type" class="easyui-combobox" style="width:49%" value="配制人工" data-options="buttonText:'类型', data:[{'id':'1','text':'配制人工'},{'id':'2','text':'灌装基础人工'},{'id':'3','text':'灌装/组装人工'},{'id':'4','text':'搬运人工'}],
                        valueField:'id',textField:'text'">
                    </div>
                    <div id="InitialInfo_static_crii_mu">
                        <div data-options="name:'typeName'">类型名称</div>
                        <div data-options="name:'num'">序号</div>
                    </div>
                </div>
                <div class="easyui-layout" data-options="fit:true">

                    <div data-options="region:'east'" style="width:450px;padding:10px">
                        <table id="InitialInfo_static_table" fitColumns="true" singleSelect="true"
                               style="width: 100%;height: auto">
                        </table>
                    </div>
                    <div data-options="region:'center'" style="padding:5px">
                        <table id="InitialInfo_static_table2" fitColumns="true" singleSelect="true"
                               style="width: 100%;height: auto">
                        </table>
                    </div>
                </div>

            </div>
            <div style="margin: 10px;">
                <label>人工成本合共:</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="laborCostTotal" style="width: 70px" >
            </div>

            <div class="easyui-panel" title="<span style='color: #987dbf'>其它费用: </span><span style='color: green'>实报实销</span>"
                 style="width:100%;height:90px;padding:10px;background:#fafafa;" data-options="collapsible:true">

                <label style="margin-left: 20px">熏蒸费</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="fumigationCharge"  style="width: 60px" >

                <label style="margin-left: 20px">纸箱证明书</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="cartonCertificate" style="width: 60px" >

                <label style="margin-left: 20px">运费</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="freight"tyle="width: 60px">

                <label style="margin-left: 20px">出口报关费用\检查费用</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="customsFee" style="width: 60px" >
                <label style="margin-left: 20px"><a id="calculateOtherCharges" onclick="calculateOtherChargesZtOnClickStatic()" href="javascript:void(0);" pageHtml="calculateOtherChargesCost.html">授权费\顾问\其他</a></label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="otherCharges" style="width: 60px">
                <label style="margin-left: 13%">其他费用合共</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="otherChargesTotal" style="width: 60px" value="0">
            </div>
            <div style="margin: 10px;">
                <label>Total of Part B:</label>
                <input class="easyui-textbox" data-options="readonly:'true'" name="totalOfPartB" style="width: 70px" >
            </div>
        </div>

        <!-- c 配件费 -->
        <div style="width: 98%;margin: 20px;margin-left: 10px;border: #eb7350 solid 2px ">
            <table id="cost_report_static_c" class="easyui-datagrid" fitColumns="true" iconCls="icon-edit" showFooter="true" singleSelect="false" style="width:100%;height:auto"
                   title="<span style='color: #1f637b;background-color:#eb7350'>C 配件费: </span><span style='color: green'> 实报</span>"
                   toolbar="#cost_report_c_tb_static">
                <thead>
                    <tr>
                        <th align="center" field="coding" width="30">品号</th>
                        <th align="center" field="mountings" width="100">配件</th>
                        <th align="center" field="mountingsPrice" width="30">配件价格</th>
                        <th align="center" field="mountingsRemark" width="80">备注</th>
                    </tr>
                </thead>
            </table>
            <!-- 配件费工具栏 -->
            <div id="cost_report_c_tb_static" style="text-align: right;">
                <a class="easyui-linkbutton" href="javascript:void(0);" iconCls="icon-add" onclick="addTartonStatic()"
                   plain="true">纸箱</a>
            </div>
        </div>
        <div style="margin: 10px;">
            <label>Total of Part C:</label>
            <input class="easyui-textbox" data-options="readonly:'true'" name="totalOfPartC" style="width: 70px" >
        </div>

        <div id="addTartonTable_tb2_static" style="text-align: right;display: none">
            <a href="#" style="margin-right: 50px"  class="easyui-linkbutton" attr="a" onclick="javaScript:$('#addTartonTableStatic').edatagrid('loadData',[]);cutAddTartontableInitStatic(this)" >切换外箱</a>
            <label style="margin-right: 30px">龙卡(啤)公式：【(长/2.54+0.5)*(宽/2.54+0.5)*单价/1000*刀卡数量+0.05】</label>
        </div>

        <div id="addTartonTable_tb_static" style="text-align: right;display: none">
            <a href="#" style="margin-right: 50px" class="easyui-linkbutton"  attr="b" onclick="javaScript:$('#addTartonTableStatic').edatagrid('loadData',[]);cutAddTartontableInitStatic(this)" >切换龙卡(啤)</a>
            <label style="margin-right: 30px">纸箱公式：【(长+宽)/2.54+2)*((宽+高)/2.54+1)*单价/500】</label>
        </div>

        <div style="width: 98%;margin: 20px 10px 5px 10px;background-color: #fff" >
            <label><span style="font-weight: bold;font-size: 22px">整体统计如下：</span></label>
            <hr>
            <table>
                <!--                T2税项-->
                <tr>
                    <td>
                        <label><span style="font-weight: bold;font-size: 16px">T2税项</span>[增值税/出口税]： 计算公式： [F-(A+C)] x 税率(內销
                            13%,外销 3%)</label>
                    </td>
                    <th style="text-align: right;width: 150px;">
                        <input class="easyui-textbox" data-options="readonly:'true'" name="vatexportTaxRate" style="width: 40px">%
                    </th>
                    <th style="text-align: right;width: 60px">Tax税款:</th>
                    <th style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'" name="vatexportTaxCost" style="width:  70px">
                    </th>
                </tr>
                <!-- T3税项-->
                <tr>
                    <td>
                        <label><span style="font-weight: bold;font-size: 16px">T3税项</span>[城建、教育税]： 计算公式：T2 x 12% </label>
                    </td>
                    <th style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'" name="taxItemRate" style="width: 40px" value="12">%
                    </th>
                    <th style="text-align: right;width: 60px">Tax税款:</th>
                    <th style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'" name="taxItemCost" style="width: 70px" value="0">
                    </th>
                </tr>
                <!-- D总成本-->
                <tr>
                    <td><label><span style="font-weight: bold;font-size: 16px">D总成本</span>： 计算公式：A+B+C x（1.05~1.1）</label></td>
                    <th style="text-align: right">
                        <label>配件耗损率</label>
                        <input class="easyui-textbox" data-options="readonly:'true'" name="accessoriesLossRate" style="width: 40px">%
                    </th>
                    <th></th>
                    <th style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'"  name="totalCost" style="width: 70px">
                    </th>
                </tr>
                <!--  DT总成本含税-->
                <tr>
                    <td> <label><span style="font-weight: bold;font-size: 16px">DT总成本含税</span>： 计算公式：D+T2+T3</label></td>
                    <th></th>
                    <th></th>
                    <th style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'"  name="totalCostIncludesTax" style="width: 70px">
                    </th>
                </tr>
                <!--  F实际报价-->
                <tr>
                    <td><label><span style="font-weight: bold;font-size: 16px">F实际报价</span>:（手工输入）</label></td>
                    <th colspan="3" style="text-align: right">
                        <input class="easyui-textbox" data-options="readonly:'true'" name="realityQuotedPrice" style="width: 70px">
                    </th>
                    <th style="text-align: center">
                        <label style="margin-left: 20px">兑换率</label>
                        <input class="easyui-textbox" data-options="readonly:'true'" name="conversionRate" style="width: 60px">
                    </th>
                    <th style="text-align: center">
                        <label style="margin-left: 5px">货币</label>
                        <input class="easyui-textbox" data-options="readonly:'true'" name="currencyType" readonly="true" style="width: 60px">
                    </th>
                    <th style="text-align: center">
                        <label style="margin-left: 5px">兑后金额</label>
                        <input class="easyui-textbox" data-options="" name="conversionMoney" style="width: 60px">
                    </th>
                </tr>
                <tr>
                    <th colspan="3" style="text-align: right">实际报价除以1.13后价格：</th>
                    <th>
                        <input class="easyui-numberbox" name="realityQuotedPrice2" data-options="readonly:'true',required:true,precision:4" style="width: 70px" >
                    </th>
                </tr>
            </table>
            <hr>
            <div style="margin-top: 10px;">
                <div style="margin-bottom: 10px">

                    <label><span style="font-weight: bold;font-size: 16px">备注:</span></label>
                    <input class="easyui-textbox" name="remark" style="width: 450px;" data-options="prompt:'利润低于10%必须备注原因，负利润必须备注订单量。',readonly:'true'">
                    <label><span style="font-weight: bold;font-size: 21px;margin-left: 190px">整套毛利</span>[计算公式：F-DT]：</label>
                    <input class="easyui-numberbox" data-options="readonly:'true',required:true,precision:4" id="grossMarginMoney"
                           name="grossMarginMoney" style="width:  80px" value="0">￥
                </div>
                <div>
                    <label style="margin-left: 602px"><span style="font-weight: bold;font-size: 21px">整套毛利百分比</span>[计算公式：(F-DT)/F]：</label>
                    <input class="easyui-numberbox" data-options="readonly:'true',required:true,precision:2" id="grossMarginRate"
                           name="grossMarginRate" style="width: 80px" value="0">%
                </div>

                <!-- 外销单-->
                <div id="costExportales_div" style="width: 500px;margin: 10px 0px 1px 505px"></div>
            </div>

        </div>
            <div style="width: 300px;margin-top:10px;margin-left: 55%">
                <table border="1">
                    <tr>
                        <th>外销单</th>
                        <th>港币兑换率</th>
                        <th>兑换金额</th>
                    </tr>
                    <tr>
                        <td> <input class="easyui-textbox" data-options="readonly:'true'" name="exportSales" style="width: 160px"></td>
                        <td> <input class="easyui-textbox" data-options="readonly:'true'" name="hkdconversion" style="width: 60px"></td>
                        <td> <input class="easyui-textbox" data-options="readonly:'true'" name="hkdconversionPrice" style="width: 60px"></td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</div>

